<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/reset.css" rel="stylesheet" type="text/css" />
<link href="css/gird.css" rel="stylesheet" type="text/css" />
<link href="css/usercenter.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery.min.js"></script> 
<script type="text/javascript" language="javascript"> 
$(function(){ 
//Bind the change event 
$("#company_type").unbind("change", eDropLangChange).bind("change", eDropLangChange); 
$("#company_type_info").unbind("change", eDropFrameChange).bind("change", eDropFrameChange); 
}); 

//The change event of language dropdown-list 
var eDropLangChange = function(){ 
//The selected value of the language dropdown-list. 
var selectedValue = $(this).val(); 

//show all options. 
$("#company_type_info").children("span").each(function(){ 
$(this).children().clone().replaceAll($(this)); //use the content of the <span> replace the <span> 
}); 

//Filter the data through selected value of language dropdown-list except <Please Select>. 
//If the option is <Please Select>, it only needs to show all and hide nothing. 
if(parseInt(selectedValue) != 0){ 
//hide the option whose parentid is not equal with selected value of language dropdown-list. 
//The <Please Select> option should not be hidden. 
$("#company_type_info").children("option[parentid!='" + selectedValue + "'][value!='0']").each(function(){ 
$(this).wrap("<span style='display:none'></span>"); //add a <span> around the <option> and hide the <span>. 
}); 
} 
}; 

//The change event of frame dropdown-list. 
var eDropFrameChange = function(){ 
//Find the selected option of frame dropdown-list. set the value of language dropdown-list by selected parentid. 
$("#company_type").val($(this).children("option:selected").attr("parentid")); 
}; 
</script> 
<script language="javascript" src="../js/area2.js"></script>
<script src="../js/jquery_last.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="../js/style/validator.css"></link>
<script src="../js/formValidator.js" type="text/javascript" charset="UTF-8"></script>
<script src="../js/formValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
<script language="javascript" src="../js/DateTimeMask.js" type="text/javascript"></script>
<script defer="defer" src="../js/datepicker/WdatePicker.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function(){
	$.formValidator.initConfig({formid:"form1",onerror:function(msg){alert(msg)},onsuccess:function(){return true;}});
	
	
	$("#com_name").formValidator({onshow:"请输入单位名称",onfocus:"注册企业请填写工商局注册的全称，无商号的个体经营者请填写执照上的名称，并标注个体经营。如：张三（个体经营）",oncorrect:"单位名称合法"}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"单位名称两边不能有空符号"},onerror:"单位名称不能为空,请确认"});
	$("#com_address").formValidator({onshow:"请输入详细地址",onfocus:"请详细填写贵公司经营地址。如：红岭中路南国大厦1栋8层。",oncorrect:"详细地址合法"}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"详细地址两边不能有空符号"},onerror:"详细地址不能为空,请确认"});
	$("#com_zip").formValidator({onshow:"请输入邮政编码",onfocus:"请输入6位邮政编码",oncorrect:"邮政编码合法"}).inputValidator({min:6,max:6,empty:{leftempty:false,rightempty:false,emptyerror:"邮政编码两边不能有空符号"},onerror:"邮政编码为空或位数不足或格式错误,请确认"});
	$("#com_level").formValidator({onshow:"请输入企业等级",onfocus:"请输入企业等级",oncorrect:"企业等级合法"}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"企业等级两边不能有空符号"},onerror:"企业等级不能为空,请确认"});
	$("#com_code").formValidator({onshow:"请输入企业代码",onfocus:"请输入企业代码",oncorrect:"企业代码合法"}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"企业代码两边不能有空符号"},onerror:"企业代码不能为空,请确认"});    	
	$("#com_builddate").focus(function(){WdatePicker({skin:'whyGreen',oncleared:function(){$(this).blur();},onpicked:function(){$(this).blur();}})}).formValidator({onshow:"请输入的出生日期",onfocus:"请输入的出生日期，不能全部是0哦",oncorrect:"你输入的日期合法"}).inputValidator({min:"1900-01-01",max:"2099-01-01",type:"date",onerror:"日期必须在\"1900-01-01\"和\"2099-01-01\"之间"});//.defaultPassed();
	$("#company_type").formValidator({}).inputValidator({min:1,onerror: "请选择专业类别!"});
});

</script>
</head>

<body onload="setup()">
<div class="page">
  <div class="header">header</div>
  <div class="content">
    <div class="gird-s5c19">
      <div class="col-main">
        <h2>申请企业会员</h2>
        <ol class="progress step1">
          <li class="on">1.企业基本信息</li>
          <li>2.企业联系方式</li>
          <li>3.企业规模</li>
          <li>4.企业生产设备</li>
          <li>5.企业主要产品</li>
        </ol>
        <h3>第一步，填写企业的基本信息：</h3>
        <div class="input">
          <form name="form1" id="form1" action="../user/addComUser1.action" method="post">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <th width="120">单位名称：</th>
                <td width="350"><input id="com_name" name="companyUser.com_name" type="text" /></td>
                <td><div id="com_nameTip"></div> </td>
              </tr>
              <tr>
                <th>专业类别：</th>
                <td>
                	<select id="company_type" name="companyUser.com_type">
                	<option value="">请选择专业类别</option>
                		<s:iterator value="LinkageList">
                			<option value="<s:property value="type_id"/>" ><s:property value="type_name"/> </option>
                		</s:iterator>
                	</select>
                	<select id="company_type_info" name="companyUser.com_type_info">
                	<option value="">请选择专业类别子类</option>
                		<s:iterator value="LinkageinfoList">
                			<option value="<s:property value="info_id"/>" parentid="<s:property value="type_id"/>"><s:property value="info_name"/> </option>
                		</s:iterator>
                	</select>
                </td>
                <td><div id="com_typeTip"></div><div id="company_type_infoTip"></div></td>
              </tr>
              <tr>
                <th>企业所在地：</th>
                <td>
					<select id="province"></select>
					<select id="city"></select>
					<select id="county"></select>
				</td>
                <td><div id="com_detailsaddressTip"></div> </td>
              </tr>
              <tr>
                <th>详细地址：</th>
                <td><input name="companyUser.com_address" type="text" id="com_address" /></td>
                <td><div id="com_addressTip"></div></td>
              </tr>
              <tr>
                <th>邮政编码：</th>
                <td><input name="companyUser.com_zip" type="text" id="com_zip"/></td>
                <td><div id="com_zipTip"></div></td>
              </tr>
              <tr>
                <th>经济性质：</th>
                <td><select size="1" id="economic_nature" name="companyUser.economic_nature">
                  <option value="国有" selected="selected">国有</option>
                  <option value="集体">集体</option>
                  <option value="股份制">股份制</option>
                  <option value="民营">民营</option>
                  <option value="中外合资">中外合资</option>
                  <option value="其它">其它</option>
                </select></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <th>企业银行信用等级：</th>
                <td>
                	<select id="com_level" name="companyUser.com_level">
                		<option value="AAA">AAA</option>
                		<option value="AA">AA</option>
                		<option value="A">A</option>
                		<option value="BBB">BBB</option>
                		<option value="BB">BB</option>
                		<option value="B">B</option>
                		<option value="CCC">CCC</option>
                		<option value="CC">CC</option>
                		<option value="C">C</option>
                		<option value="无">无</option>
                	</select>
                </td>
                <td><div id="com_levelTip"></div></td>
              </tr>
              <tr>
                <th>企业代码：</th>
                <td><input name="companyUser.com_code" type="text" id="com_code"/></td>
                <td><div id="com_codeTip"></div></td>
              </tr>
              <tr>
                <th>建厂时间：</th>
                <td><input name="companyUser.com_builddate" type="text" id="com_builddate"/></td>
                <td><div id="com_builddateTip"></div> </td>
              </tr>
            </table>
        </div>
        <div class="btn"><button type="submit" class="next">下一步，填写联系方式</button></div>
     </form>
      </div>
      <div class="col-sub">
        <div class="box">
          <div class="box-tp"></div>
          <div class="box-main">
            <h2>用户中心</h2>
            <ul>
              <li><a href="../user/getComRegState.action">申请企业会员</a></li>
              <li><a href="../user/webUserEdit.action">资料修改</a></li>
              <li><a href="#">参与行业普查</a></li>
              <li><a href="#">我要投稿</a></li>
              <li><a href="../user/UserLoginOut.action">退出</a></li>
            </ul>
          </div>
          <div class="box-bt"></div>
        </div>
      </div>
    </div>
  </div>
  <div class="footer"></div>
</div>
</body>
</html>
<!--js初始化函数-->
			<SCRIPT language="javascript">
			setup()
			</SCRIPT>
